'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller } = app;
  router.get('/', controller.home.index);
  router.get('/monitor', controller.wx.monitor.index)
  // 管理后台相关接口
  router.post('/monitor/admin/login', controller.admin.user.login)
  router.get('/monitor/admin/userInfo', controller.admin.user.userInfo)
  router.post('/monitor/admin/error_list', controller.admin.monitor.errorList)
  router.post('/monitor/admin/ajax_list', controller.admin.monitor.ajaxList)
  router.post('/monitor/admin/page_list', controller.admin.monitor.pageList)
  router.post('/monitor/admin/statistics', controller.admin.monitor.statistics)
  router.post('/monitor/admin/visit-list', controller.admin.monitor.visitList)

  // web端相关接口
  router.post('/monitor/web/report', controller.wx.monitor.report)
};
